package COM.AAA.BBB.cc.controller;

import COM.AAA.BBB.cc.common.vo.R;
import COM.AAA.BBB.cc.entity.Userproject;
import COM.AAA.BBB.cc.service.intf.UserprojectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName asdfg项目的控制层的UserprojectController类
 * @Description 实现Userproject的对外的接口
 * @Author 旭友
 * @Date 2021-11-11 00:17:38
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/userproject/")
public class UserprojectController {
    @Autowired
    private UserprojectService service;
    //新增
    @PostMapping("save")
    public R save(@RequestBody Userproject entity){
        return service.save(entity);
    }
    //查询详情
    @GetMapping("detail")
    public R queryDetail(int id){
        return service.queryById(id);
    }
    //查询详情
    @GetMapping("page")
    public R queryPage(int page,int size){
        return service.queryPage(page, size);
    }
}
